# taskiq_redis_demo.py
from datetime import timedelta

from taskiq import TaskiqScheduler
from taskiq_redis import redis_broker

broker = redis_broker("redis://192.168.77.101:6379")
scheduler = TaskiqScheduler(broker=broker)

@broker.task
async def add_numbers(a: int, b: int) -> int:
    return a + b

@scheduler.task(schedule=timedelta(seconds=10))
async def scheduled_task():
    print("Running scheduled task!")